﻿using Google.Protobuf;

namespace Net.Public.Msg
{
    public class BaseMsg
    {
        public int headLen = 0;
        public IMessage value;
        public EMsgType msgType; 
        public BaseMsg(){}
        
        public BaseMsg(IMessage value,EMsgType msgType)
        {
            this.value = value;
            this.msgType = msgType;
        }
    }

    public class BaseMsg<U> : BaseMsg where U : IMessage, new()
    {
        public U value;
        public BaseMsg(U value)
        {
            this.value = this.value;
        }
    }
}